Part Number Hot Search : 
IPD60 AD1852 MAX2657 3323W500 075784 RTD2023B DD34A UDZS12B
Product Description
Full Text Search
 

To Download MCP2150 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 MCP2120/MCP2150 DEVELOPER'S KIT USER'S GUIDE
Information contained in this publication regarding device applications and the like is intended by way of suggestion only. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information. Use of Microchip's products as critical components in life support systems is not authorized except with express written approval by Microchip. 2001 Microchip Technology Incorporated. All rights reserved. The Microchip logo, name, PIC, PICmicro, PICSTART, PRO MATE, KEELOQ, MPLAB, and MXDEV are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. microID, and Smart Serial are trademarks of Microchip Technology in the U.S.A. and other countries. All product/company trademarks mentioned herein are the property of their respective companies.
2001 Microchip Technology Inc.
DS51246A
MCP2120/2150 User's Guide
NOTES:
DS51246A
2001 Microchip Technology Inc.
12
Table of Contents
Chapter 1. Introduction
1.1 1.2 1.3 1.4 1.5 2.1 2.2 2.3 2.4 2.5 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 5.1 5.2
MCP2120/MCP2150 USER'S GUIDE
Welcome ......................................................................................... 1 MCP2120/MCP2150 Developer's Kit User's Guide ........................ 2 Sample Devices .............................................................................. 3 Reference Documents .................................................................... 3 Other Related Documents .............................................................. 3 Introduction ..................................................................................... 5 Highlights ........................................................................................ 5 Developer Board Features .............................................................. 6 System Configurations .................................................................. 17 PC Requirements ......................................................................... 20 Introduction ................................................................................... 21 Highlights ...................................................................................... 21 MCP2120 Tutorial Setup .............................................................. 21 Hardware Setup ............................................................................ 22 Setting Up the Terminal Program ................................................. 25 Transmitting/Receiving Data ......................................................... 35 Introduction ................................................................................... 39 Highlights ...................................................................................... 39 MCP2150 Tutorial ......................................................................... 39 Using the PICDEM 1 Board .......................................................... 41 Using the PICDEM 2 Board .......................................................... 43
Chapter 2. Getting Started
Chapter 3. MCP2120 Tutorial
Chapter 4. MCP2150 Tutorial
Chapter 5. Using a PICDEMTM 1 or PICDEMTM 2 Board as Host
2001 Microchip Technology Inc.
DS51246A-page iii
MCP2120/MCP2150 USER'S GUIDE
Appendix A. Hardware Detail
A.1 A.2 A.3 A.4 A.5 A.6 A.7 Power Supply ................................................................................45 Power Indicator .............................................................................45 RS-232 Serial Port ........................................................................45 Jumpers ........................................................................................46 Oscillator Options ..........................................................................48 Board Layout .................................................................................49 Schematics ....................................................................................50
Revision History ........................................................................................ 53 Index .......................................................................................................... 55 Worldwide Sales and Service ...................................................................... 0
DS51246A-page iv
2001 Microchip Technology Inc.
12
1.1 Welcome
MCP2120/MCP2150 USER'S GUIDE Chapter 1. Introduction
Thank you for purchasing the MCP2120/MCP2150 Developer's Kit from Microchip Technology Inc. The MCP2120/MCP2150 Developer's Kit demonstrates the capabilities of the MCP2120 and MCP2150 infrared communication products. The MCP2120 Developer's Board and the MCP2150 Developer's Board can be connected to either a PC via the DB9 connector, or to another system (such as a PICDEM 2 board) via the four pin header. The MCP2120/MCP2150 Developer's Kit comes with the following: 1. 2. 3. 4. 5. 6. Two MCP2120 Developer Boards. One MCP2150 Developer Board. Two serial cables. One 9V power supply, with power cord. One pair 18" (45 cm) power jumper cables. Sample kit (one MCP2120 device and one MCP2150 device)-Not shown. 7. MCP2120/MCP2150 Developer's Kit User's Guide (This document)-Not shown. If you are missing any part of the kit, please contact your nearest Microchip sales office listed in the back of this publication for help. Figure 1.1: MCP2120/MCP2150 Developer's Kit
4
3
3
5
4 2 1
1 2
2001 Microchip Technology Inc.
DS51246A-page 1
MCP2120/MCP2150 USER'S GUIDE 1.2 MCP2120/MCP2150 Developer's Kit User's Guide
This document describes the MCP2120/MCP2150 Developer's Kit and tutorials, giving the user a brief overview of Microchip's MCP2120 and MCP2150 family of infrared communication products. Detailed information on the individual device may be found in the device's respective data sheet. Detailed information on the PICDEM 2 development board may be found in the PICDEM 2 User's Guide (DS30374). Chapter 1: Introduction - This chapter introduces the MCP2120/MCP2150 Developer's Kit, lists the components in the kit, and lists related documentation. Chapter 2: Getting Started - This chapter gives an overview of the MCP2120 and MCP2150 Developer's Boards, the hardware features of each Developer's Board, the system configurations that can be used to demonstrate the MCP2120 and MCP2150 devices, and the PC requirements. Chapter 3: MCP2120 Tutorial - This chapter provides a detailed description of the steps to get the MCP2120 Developer's board operating. These steps include the configuration of the Developer's boards and the Terminal Emulation program (Hyperterminal) used on the PC. Chapter 4: MCP2150 Tutorial - This chapter provides a detailed description of the steps to get the MCP2150 Developer's board operating. These steps include the configuration of the Developer's boards, the Terminal Emulation program (Hyperterminal) used on the PC, and the installation and configuration of the PC IrDA standard drivers. Chapter 5: Using PICDEM 1 or PICDEM 2 Board as Host. This chapter discusses the use of the PICDEM boards as a demonstration platform as a Host Controller for an MCP2120 Developer's Board or an MCP2150 Developer's Board. This chapter makes reference to Application Notes which contain demonstration code. Appendix A: Hardware Description: This appendix describes in detail the hardware of the MCP2120 Developer's board and MCP2150 Developer's board. This includes the component layout of each board (silkscreen) and the schematic of each board. Revision History: This covers the major changes to the document between the revisions. Index: This lists the pages where major topics are located.
DS51246A-page 2
2001 Microchip Technology Inc.
Introduction 1.3 Sample Devices
Each kit comes with one MCP2120 device and one MCP2150 device. This allows a prototype system to be developed that can be used with an MCP2120 Developer's Board or an MCP2150 Developer's Board.
1.4 Reference Documents
Reference documents may be obtained by contacting your nearest Microchip sales office (listed in the back of this document) or by downloading via the Microchip website (www.microchip.com). * MCP2120 Data Sheet, DS21618 * MCP2150 Data Sheet, DS21655 * AN756, "Using the MCP2120 for Infrared Communication", DS00756 * AN758, "Using the MCP2150 to Add IrDA(R) Standard Wireless Connectivity", DS00758 * TB046, "Connecting the MCP2150 to the Psion Operating System", DS91046 * TB047, "Connecting the MCP2150 to the Windows(R) CE Operating System", DS91047 * TB048, "Connecting the MCP2150 to the Windows(R) Operating System", DS91048 * TB049, "Connecting the MCP2150 to the PalmTM Operating System", DS91049
1.5 Other Related Documents
* MPASM User's Guide with MPLINKTM Linker and MPLIBTM Library, DS33014 * PRO MATE(R) II User's Guide, DS30082 * PICSTART(R) Plus User's Guide, DS51028 * MPLAB(R) ICE User's Guide, DS51159 * MPLAB(R) ICD User's Guide, DS51184 * Microchip's Third Party Guide, DS00104
IrDA is a registered trademark of the Infrared Data Association.
2001 Microchip Technology Inc.
DS51246A-page 3
MCP2120/MCP2150 USER'S GUIDE
NOTES:
DS51246A-page 4
2001 Microchip Technology Inc.
12
2.1 Introduction 2.2 Highlights
Topics covered in this chapter * MCP2120 Developer's Board * MCP2150 Developer's Board * System Configurations * PC Requirements
MCP2120/MCP2150 USER'S GUIDE
Chapter 2. Getting Started
This chapter covers an overview of the MCP2120 and MCP2150 Developer's Boards features, the system configurations that they can be used in, and the system requirements for the tutorials.
2001 Microchip Technology Inc.
DS51246A-page 5
MCP2120/MCP2150 USER'S GUIDE 2.3 Developer Board Features
2.3.1. MCP2120 Developer's Board
The MCP2120 Developer's Board, as shown in Figure 2.1, has the following hardware features: 1. On-board +5V regulator for direct input from 9V, 750 mA AC/DC wall adapter or 9V battery. 2. Hooks for a +5V, 750 mA regulated DC supply. 3. DB-9 connector and associated hardware for direct connection to MCP2120 UART (DB-9 interface requires RS-232 signal levels). 4. Four-pin header connection to UART interface (Header requires TTL level signals). 5. Two jumpers to select source of UART signals. Either DB-9 connector or the four-pin header. 6. Three jumpers to select desired baud rate. 7. Green power-on indicator LED. 8. Two IR Transceiver options (two jumpers select transceiver). 9. Jumper to disable MCP2120 device operation. 10. Hardware and Software Baud selection. 11. Jumper for Software Baud control when using RS-232C interface. 12. Socketed crystal. Note: A schematic of the MCP2120 Developer's Board is shown in Figure A.5
DS51246A-page 6
2001 Microchip Technology Inc.
Getting Started
Figure 2.1: MCP2120 Developer's Board Hardware
1 7 12 9
R9
D3
C17
D6 D2 U2 C6 R3 C10 U4
C11 R15 C18
U5
Y1
J5 D4 C15
CR1
C4 C7
R4 JP4 (MCP2120) Open=Enabled R8 R7 R6
R5 R10 R11 Component D1 Transceiver D5 J7 R12 J6
3
C12 C13
C8 C14 JP5R1 Q1 U3
8
JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 RX TX MODE RTS Integrated Transceiver R13 C16 U6
C9 C5 C1 J2 U1
R14
R2 C2 C3
DB9
J4 J1
MCP2120 Developer's Board 02-01608 Rev. 1
Header
J3
+5V GND
11
5
4
2
6
10
2001 Microchip Technology Inc.
DS51246A-page 7
MCP2120/MCP2150 USER'S GUIDE
2.3.1.1 Selecting UART Source and Optical Transceiver Interface
Figure 2.2 shows two pairs of jumpers used to route signals to and from the MCP2120. Jumpers J1 and J4 are used to determine the source of the signals used by the UART interface. When the header has the pins closest to the "DB9" label jumpered to the center pin, the DB9 is the source of the UART signal. When the header has the pins closest to the "Header" label jumpered to the center pin, the four-pin header is the source of the UART signal. Jumpers J6 and J7 are used to determine the source and destination of the infrared data signals used by the interface between the MCP2120 and Optical Transceiver. When the header has the pins closest to the "Integrated Transceiver" label jumpered to the center pin, the integrated transceiver is used. When the header has the pins closest to the "Component Transceiver" label jumpered to the center pin, the component transceiver logic is used. Figure 2.2: MCP2120 Selecting Sources
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 R14 U6 C8 C10 R4 JP4 R5 R10 R11 Component Transceiver J7 J6 D1 D5 R12 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
U3 C2
C9 C5 C1
R2
C3
JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS
Integrated Transceiver R13 C16
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
These two jumpers select the source of the Host signals. J1 and J4 Header is source.
These two jumpers select the optical transceiver logic. Both jumpers should connect the same pin positions J6 and J7 Component Transceiver
DB9 is source. Integrated Transceiver
DS51246A-page 8
2001 Microchip Technology Inc.
Getting Started
2.3.1.2 Selecting Baud Rate
Figure 2.3 shows the three Baud Rate Select Jumpers (JP3:JP1) and the baud rate formula that is specified (baud rate dependant on MCP2120 operational frequency). Table 2.1 shows the baud rates for some crystal frequencies. Figure 2.3: MCP2120 Baud Rate
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
R5 R11 R10 Component Transceiver J7 J6 D1 D5 R12
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
These three jumpers select the baud rate: JP3:JP2:JP1 JP3:JP2:JP1 FOSC/768 FOSC/384 FOSC/192 FOSC/128 FOSC/64 Software Baud Mode
Table: 2.1 Hardware Baud Rate Selection vs. Frequency
FOSC Frequency (MHz) BAUD2:BAUD0 0.6144 (1) 2.000 3.6864 4.9152 7.3728 14.7456 (2) 19200 38400 78600 115200 230400 20.000 (2) 26042 52083 104167 156250 312500 Bit Rate FOSC / 768 FOSC / 384 FOSC / 192 FOSC / 128 FOSC / 64
800 2604 4800 6400 9600 000 001 1600 5208 9600 12800 19200 010 3200 10417 19200 25600 38400 011 4800 15625 28800 38400 57600 100 9600 31250 57600 78600 115200 Note 1: An external clock is recommended for frequencies below 2 MHz.
Note 2: For frequencies above 7.5 MHz, the TXIR pulse width (MCP2120 Data Sheet, Electrical Specification, parameter IR121) will be shorter than the minimum pulse width of 1.6 s in the IrDA standard specification.
2001 Microchip Technology Inc.
DS51246A-page 9
MCP2120/MCP2150 USER'S GUIDE
2.3.1.3 UART Mode
Figure 2.4 shows the jumper which determines if the MCP2120 Developer's Board is to be used in Hardware Baud operation, or Software Baud operation. When in Software Baud operation, an additional signal is required, Request To Send (RTS), which is used to drive the RESET pin low to cause a change of baud rate to occur. Figure 2.4: MCP2120 UART
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
R5 R11 R10 Component Transceiver J7 J6 D1 D5 R12
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
PC UART configuration for Hardware/Software Baud mode Hardware Baud Selection Software Baud Selection
DS51246A-page 10
2001 Microchip Technology Inc.
Getting Started
2.3.1.4 Disabling the MCP2120
Figure 2.5 shows the jumper, JP4, which will enable or disable the MCP2120 device. When the MCP2120 is disabled, the device will consume less current. Figure 2.5: MCP2120 Enable/Disable
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
R5 R11 R10 Component Transceiver J7 J6 D1 D5 R12
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
MCP2120 Enable/Disable Enabled Disabled
In most cases, this jumper will be open. It may be closed to test system operation when the MCP2120 is disabled. The Host Controller board may control the operation of the MCP2120 by connecting a signal to the JP4 header as shown in Figure 2.6. Figure 2.6: Host Controller Disabling the MCP2120
MCP2120 Developer's Board Host Controller
MCP2120 EN
JP4
I/O Pin (High or Hi Impedance = Enabled Low = Disabled)
2001 Microchip Technology Inc.
DS51246A-page 11
MCP2120/MCP2150 USER'S GUIDE
2.3.2. MCP2150 Developer's Board
The MCP2150 Developer's Board, as shown in Figure 2.7, has the following hardware features: 1. On-board +5V regulator for direct input from 9V, 750 mA AC/DC wall adapter or 9V battery. 2. Hooks for a +5V, 750 mA regulated DC supply. 3. DB-9 connector and associated hardware for direct connection to MCP2150 UART (DB-9 interface requires RS-232 signal levels). 4. Ten-pin header connection to UART interface (Header requires TTL level signals). 5. Three jumpers to select source of UART signals. Either DB-9 connector or the eight-pin header. 6. Two jumpers to select desired baud rate. 7. Green power-on indicator LED. 8. Green LED for Carrier Detect. 9. Two IR Transceiver options (two jumpers select transceiver). 10. Jumper to disable MCP2150 device operation. 11. Hardware Baud selection. Note: A schematic of the MCP2150 Developer's Board is shown in Figure A.6
DS51246A-page 12
2001 Microchip Technology Inc.
Getting Started
Figure 2.7: MCP2150 Board Hardware
1
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3
7
Power D3 R7
10
C5 R8 R9 C11 U4 R5 R6 C13 C6 D2D5 C9 U3 D1 R14 R10 D6 U6 JP2 JP1 00 01 10 11 Integrated BAUD Transceiver 9600 19200 R11 R13 C16 57600 115200 R1
J6
3
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
9
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
DB9
+5VGND
8
5
4
2
6
11
2001 Microchip Technology Inc.
DS51246A-page 13
MCP2120/MCP2150 USER'S GUIDE
2.3.2.1 Selecting UART Source and Optical Transceiver Interface
Figure 2.8 shows two sets of jumpers used to route signals to and from the MCP2150. Jumpers J2, J3 and J4 are used to determine the source of the signals used by the UART interface. When the header has the pins closest to the "DB9" label jumpered to the center pin, the DB9 is the source of the UART signal. When the header has the pins closest to the "Header" label jumpered to the center pin, the four-pin header is the source of the UART signal. Jumpers J7 and J8 are used to determine the source and destination of the IrDA signals used by the interface between the MCP2150 and Optical Transceiver. When the header has the pins closest to the "Integrated Transceiver" label jumpered to the center pin, the integrated transceiver is used. When the header has the pins closest to the "Component Transceiver" label jumpered to the center pin, the component transceiver logic is used. Figure 2.8: MCP2150 Selecting Sources
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3 Power D3 R7 C5 R8 R9 C11 U4 R5 R6 C13 C6 U6 JP2 JP1 00 01 10 11 BAUD 9600 19200 R11 R13 C16 57600 115200 Integrated Transceiver D2D5 C9 U3 D1 R14 R10 D6 R1
J6
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
These three jumpers select the source of the Host signals. J2, J3 and J4 Header is source.
DB9
+5VGND
These two jumpers select the optical transceiver logic. Both jumpers should connect the same pin positions J7 and J8 Component Transceiver
DB9 is source.
Integrated Transceiver
DS51246A-page 14
2001 Microchip Technology Inc.
Getting Started
2.3.2.2 Selecting Baud Rate
Figure 2.9 shows the two Baud Rate Select jumpers (JP2:JP1) and the baud rate. Table 2.2 shows the baud rates for some crystal frequencies. Figure 2.9: MCP2150 Baud Rate
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3 Power D3 R7 C5 R8 R9 C11 U4 R5 R6 C13 C6 U6 JP2 JP1 00 01 10 11 BAUD 9600 19200 R11 R13 C16 57600 115200 Integrated Transceiver D2D5 C9 U3 D1 R14 R10 D6 R1
J6
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
These three jumpers select the Baud Rate JP2:JP1 JP2:JP1 9600 19200 57600 115200
Table: 2.2 Serial Baud Rate Selection vs. Frequency
BAUD1:BAUD0 00 01 10 11 Baud Rate @ 11.0592 MHz 9600 19200 57600 115200 Bit Rate FOSC / 1152 FOSC / 576 FOSC / 192 FOSC / 96
DB9
+5VGND
2001 Microchip Technology Inc.
DS51246A-page 15
MCP2120/MCP2150 USER'S GUIDE
2.3.2.3 Disabling the MCP2150
Figure 2.10 shows the jumper (JP3) which will enable or disable the MCP2150 device. When the MCP2150 is disabled, the device will consume less current. Figure 2.10: MCP2150 Enable/Disable
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3 Power D3 R7 C5 R8 R9 C11 U4 R5 R6 C13 C6 U6 JP2 JP1 00 01 10 11 BAUD 9600 19200 R11 R13 C16 57600 115200 Integrated Transceiver D2D5 C9 U3 D1 R14 R10 D6 R1
J6
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
DB9
+5VGND
MCP2150 Enable/Disable Enabled Disabled
In most cases, this jumper will be open. It may be closed to test system operation when the MCP2150 is disabled. The Host Controller board may control the operation of the MCP2150 by connecting a signal to the JP3 header as shown in Figure 2.11. Figure 2.11: Host Controller Disabling the MCP2150
MCP2150 Developer's Board Host Controller
MCP2150 EN
JP4
I/O Pin (High or Hi Impedance = Enabled Low = Disabled)
DS51246A-page 16
2001 Microchip Technology Inc.
Getting Started 2.4 System Configurations
There are five configurations that one would use for initial evaluation of these two Developer's Boards. These configurations are: Developer's Board #1 1. MCP2120 Dev Board (ASCII) 2. MCP2120 Dev Board (IR Driver) 3. MCP2150 Dev Board (ASCII) 4. MCP2120 Dev Board (IR Driver) 5. MCP2150 Dev Board (ASCII) Developer's Board #2 MCP2120 Dev Board (ASCII) MCP2120 Dev Board (IR Driver) MCP2120 Dev Board (IR Driver) IrDA standard port (PalmTM Pilot, cell phone, ...) IrDA standard port (Palm Pilot, cell phone, ...)
The Host controller for each board can be either a Personal Computer (PC) or another system connected to the Host header. The PC operating system (OS) may be any desired OS that has a terminal emulation program which can connect to the serial port and can treat the IR port as a virtual serial port. For our tutorial, we will use the Windows 9x OS. Note 1: Windows NT(R) 4.x (and lower) does not support the IrDA standard functionality. Third Party programs exist, but are not supported or recommended by Microsoft, so are also not recommended by Microchip. 2: Windows(R) 2000 does support the IrDA standard, but does not treat the IR port as a virtual serial port. This means that you cannot access the IR port as a serial port. This causes issues with some terminal emulation programs, such as Hyperterminal. Windows 2000 considers the IrDA port to be a network device. Applications that can access a network service through a network protocol (i.e. TCP/IP) can use the MCP2120 Developer's Board using the appropriate Windows 2000 driver.
Palm is a trademark of Palm, Inc. Windows NT and Windows 2000 are registered trademarks of Microsoft Corporation.
2001 Microchip Technology Inc.
DS51246A-page 17
MCP2120/MCP2150 USER'S GUIDE
2.4.1. Configuration 1
Developer's Board #1 Developer's Board #2 MCP2120 Dev Board (ASCII) MCP2120 Dev Board (ASCII) This is the typical mode that will be used for the two MCP2120 Developer's Board. In this configuration, the MCP2120 board receives data as a single ASCII byte. This byte is then translated to the IR data format, and transmitted out of the selected optical transceiver logic. The host interface can be from either the DB-9 (PC or other UART) or the Header. A PC running a terminal emulation program, such as Hyperterminal, connected to the serial port will create this ASCII data stream. The PC can then be connected to the Developer's Board DB-9 connector.
2.4.2.
Configuration 2
Developer's Board #1 Developer's Board #2 MCP2120 Dev Board (IR Driver) MCP2120 Dev Board (IR Driver) This is used to view the effects of the IrDA standard stack protocol on the data stream. This can be used to better understand the construction of the IrDA standard data packet, or as a diagnostic tool. The host interface can be from either the DB-9 (PC or other UART) or the Header. A PC running a terminal emulation program, such as Hyperterminal, connected to the IR port as a virtual serial port will create this ASCII data stream. The PC can then be connected to the MCP2120 Developer's Board DB-9 connector.
2.4.3.
Configuration 3
Developer's Board #1 Developer's Board #2 MCP2150 Dev Board (ASCII) MCP2120 Dev Board (IR Driver) This is the configuration when using one MCP2120 Developer's Board and one MCP2150 Developer's Board. The MCP2150 Developer's Board can have the host interface be from either the DB-9 (PC or other UART) or the Header. The MCP2120 Developer's Board would interface to a PC running a terminal emulation program, such as Hyperterminal, that connects the IR port to a virtual serial port.
DS51246A-page 18
2001 Microchip Technology Inc.
Getting Started
2.4.4. Configuration 4
Developer's Board #1 Developer's Board #2 MCP2120 Dev Board (IR Driver) IrDA standard port (Palm Pilot, cell phone, ...) This configuration is used to evaluate the MCP2120 for an IrDA system, where the Host Controller is responsible for the IrDA protocol stack. The MCP2120 Developer's Board interfaces to a PC running a terminal emulation program, such as Hyperterminal, that connects the IR port to a virtual serial port.
2.4.5.
Configuration 5
Developer's Board #1 Developer's Board #2 MCP2150 Dev Board (ASCII) IrDA standard port (Palm Pilot, cell phone, ...) This configuration is used to evaluate the MCP2150 for adding the IrDA feature to a system. The Host controller only needs to send and receive the required ASCII data, while the MCP2150 handles the IrDA standard protocol stack. The MCP2150 Developer's Board can have the host interface be from either the DB-9 (PC or other UART) or the Header.
2001 Microchip Technology Inc.
DS51246A-page 19
MCP2120/MCP2150 USER'S GUIDE 2.5 PC Requirements
The PC used has three main requirements. These are: 1. Standard Serial Port. 2. Terminal Emulation Program. 3. IrDA standard driver installed, which treats the IR port as a virtual serial port. A non-legacy-free Intel compatible model with Windows 9x/2000 Operating System (OS) would meet these requirements. The Windows OS includes a Terminal Emulation program called Hyperterminal. Section 3.5 shows instructions to configure Hyperterminal and demonstrate the Developer's Boards. Note 1: Windows(R) 2000 does support the IrDA standard, but does not treat the IR port as a virtual serial port. This means that you cannot access the IR port as a serial port. This causes issues with some terminal emulation programs, such as Hyperterminal. Windows 2000 considers the IrDA port to be a network device. Applications that can access a network service through a network protocol (i.e. TCP/IP) can use the MCP2120 Developer's Board using the appropriate Windows 2000 driver.
DS51246A-page 20
2001 Microchip Technology Inc.
12
3.1 Introduction 3.2 Highlights
Topics covered in this chapter * MCP2120 Tutorial Setup * Hardware Setup * Setting Up the Terminal Program * Transmitting/Receiving Data
MCP2120/MCP2150 USER'S GUIDE
Chapter 3. MCP2120 Tutorial
This chapter covers a tutorial for using the MCP2120 Developer's Board.
3.3 MCP2120 Tutorial Setup
This tutorial will use both MCP2120 Developer's Boards. The system will operate at 9600 Baud. Each board will be connected via the UART to the serial port of a personal computer (PC). This means that either two PCs are required, or a PC with two serial ports, as shown in Figure 3.1. It is assumed that two PCs will be used, and that each PC will have the Terminal Emulation program configured identically. Figure 3.1: System Block Diagram
MCP2120 Developer's Board 1
C17 R9 U5 D3 D6D2 U2 C6 R3 C10 U4 R5 R10 R11 C11 R15 C18 Y1 J5 D4 C15 CR1 C4 C7 C12 C13 C8 C14 R1 JP5 Q1 C9 C5 C1 J2 U1 R14 U3 Integrated JP3:JP1 000=Fosc/768 Transceiver R2 C2 001=Fosc/384 010=Fosc/192 011=Fosc/128 R13 100=Fosc/64 C3 111=S/W Baud C16 Open=0 RX TX MODE RTS U6 R4 JP4
MCP2120 Developer's Board 2
R15 C11 C18 C6 R3 U4 C10 R5 R11 R10 U2 D2D6 C17 D3 R9 U5 JP4 R4 C4 C7 C8 R1 JP5 U6 Q1 U3 Integrated JP3:JP1 Transceiver 000=Fosc/768 R14 001=Fosc/384 C2 R2 010=Fosc/192 R13 011=Fosc/128 100=Fosc/64 C3 C16 111=S/W Baud Open=0 RX TX MODE RTS C14 C12 C13 CR1 J5 C15 D4 Y1
(MCP2120) Open=Enabled Component D1 Transceiver D5 R8 R7 R6 J6 J7 R12
(MCP2120) Component Open=Enabled D1 Transceiver D5 R6 R7 R8 R12 J7 J6
C9 C5 U1
J4 MCP2120 Developer's Board 02-01608 Rev. 1 J1
J3
+5VGND
GND+5V
J3
C1 J2 J4 MCP2120 Developer's Board 02-01608 Rev. 1 J1 DB9
Header
Header
PC
DB9
PC
2001 Microchip Technology Inc.
DS51246A-page 21
MCP2120/MCP2150 USER'S GUIDE 3.4 Hardware Setup
3.4.1. Oscillator
The crystal oscillator has pin receptacles to allow the changing of the MCP2120 oscillator frequency. For the tutorial, we will be using a crystal frequency of 7.3728 MHz. This crystal frequency is shipped in the kit.
3.4.2.
Board Jumpers
The MCP2120 and MCP2150 Developer's Boards may use one of two host interfaces, the DB-9 interface to connect to a PC, or the header to connect to a controller board. For the tutorial, the host signal will come from the DB-9 connector and the infrared data signals will interface to the Integrated Optical Transceiver. Figure 3.2 shows how the two 3-pin jumpers need to be connected for this configuration. Figure 3.2: MCP2120 Developer's Board Component Layout
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
R5 R11 R10 Component Transceiver J7 J6 D1 D5 R12
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
These two jumpers select the source of the Host signals. J1 and J4 DB9 is source.
These two jumpers select the optical transceiver logic. Both jumpers should connect the same pin positions J6 and J7 Integrated Transceiver
DS51246A-page 22
2001 Microchip Technology Inc.
MCP2120 Tutorial
Figure 3.3 shows the three Baud Rate Select jumpers (JP3:JP1) and the baud rate formula that is specified (baud rate dependant on MCP2120 operational frequency). The tutorial requires these jumpers to be open for a baud rate of 9600, when the crystal frequency is 7.3728 MHz. Figure 3.3: MCP2120 Baud Rate
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 R5 R10 R11 Component Transceiver J7 J6 D1 D5 R12 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
These three jumpers select the Baud Rate JP3:JP2:JP1 FOSC/768
2001 Microchip Technology Inc.
DS51246A-page 23
MCP2120/MCP2150 USER'S GUIDE
Figure 3.4 shows jumpers JP4 and JP5 and their state. For the tutorial, both of these jumpers are required to be open. Figure 3.4: MCP2120 UART Mode and Enable Mode
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 R5 R10 R11 Component Transceiver J7 J6 D1 D5 R12 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
PC UART configuration for Hardware/Software Baud mode Hardware Baud Selection
MCP2120 Enable/Disable Enabled
DS51246A-page 24
2001 Microchip Technology Inc.
MCP2120 Tutorial 3.5 Setting Up the Terminal Program
Windows(R) 95 Operating System (OS) comes with a Terminal Emulation program called Hyperterminal. This tutorial uses this program to demonstrate the operation of the MCP2120/MCP2150 Developer's Kit boards. To open Hyperterminal, select Start > Programs > Accessories and select the Hyperterminal folder. Then double click the program file Hypertrm.exe. to start Hyperterminal. Figure 3.5 shows the initial screen once the Hyperterminal program is open. You will then need to select a name for this configuration. Figure 3.5: Hyperterminal Opening Screen
For the initial test, we will set up the system to operate at 9600 baud. Type the name as shown in Figure 3.6 and select any icon. Click OK. Figure 3.6: Choosing Name and Icon
Windows is a registered trademark of Microsoft Corporation.
2001 Microchip Technology Inc.
DS51246A-page 25
MCP2120/MCP2150 USER'S GUIDE
The menu in Figure 3.7 appears. You will need to select the port your serial port is on (Connect using). In our case, we are using COM1. Click OK. Figure 3.7: Selecting Communications (COM) Port
The Default settings for COM1 are displayed in Figure 3.8. Figure 3.8: Hyperterminal Default COM Port Settings
DS51246A-page 26
2001 Microchip Technology Inc.
MCP2120 Tutorial
The COM port settings need to be modified so the Bits per second is "9600" and the Flow Control is "None", as shown in Figure 3.9. Click OK when done. Figure 3.9: Desired Hyperterminal COM Port Settings
2001 Microchip Technology Inc.
DS51246A-page 27
MCP2120/MCP2150 USER'S GUIDE
The terminal window opens connected to the serial port as shown in Figure 3.10. Figure 3.10: Hyperterminal Screen After Initial Setup
DS51246A-page 28
2001 Microchip Technology Inc.
MCP2120 Tutorial
When the characteristics of the Hyperterminal session need to be modified, the program should be disconnected from the port. To disconnect, click on the icon with the handset with the down arrow onto the phone base as shown in Figure 3.11. Figure 3.11: Disconnecting Hyperterminal
2001 Microchip Technology Inc.
DS51246A-page 29
MCP2120/MCP2150 USER'S GUIDE
To modify the properties of this Hyperterminal session, select File > Properties as shown in Figure 3.12. Figure 3.12: Selecting Hyperterminal Properties Menu
DS51246A-page 30
2001 Microchip Technology Inc.
MCP2120 Tutorial
The Hyperterminal Properties window will appear as shown in Figure 3.13. Clicking the "Configure..." button will open the COM Properties window shown in Figure 3.14. Figure 3.13: Hyperterminal Properties Menu (Connect To)
2001 Microchip Technology Inc.
DS51246A-page 31
MCP2120/MCP2150 USER'S GUIDE
Verify the settings are as desired. If not, change the settings to match the settings in Figure 3.14. Click the OK button and you will return to the window shown in Figure 3.13. Figure 3.14: Configure Connection Menu
DS51246A-page 32
2001 Microchip Technology Inc.
MCP2120 Tutorial
Click on the Settings tab. Figure 3.15 shows the default settings. The "Backscroll buffer lines" setting can be modified to 0, if desired. This will make viewing information in the Hyperterminal window more convenient. Figure 3.15: Hyperterminal Properties Menu (Settings)
Clicking on the "Input Translation..." button will bring up the following window. Click Cancel to close this window. Figure 3.16: Input Translation Menu
2001 Microchip Technology Inc.
DS51246A-page 33
MCP2120/MCP2150 USER'S GUIDE
Clicking on the "ASCII Setup..." button will bring up the ASCII Setup window. Make the changes as shown in Figure 3.17 by checking the "Echo typed characters locally" setting. Click OK to apply these changes and close the window. Figure 3.17: ASCII Setup Menu
DS51246A-page 34
2001 Microchip Technology Inc.
MCP2120 Tutorial 3.6 Transmitting/Receiving Data
Now both PCs should have their Hyperterminal program running in the connected mode with the same COM port settings. See Figure 3.9. Each MCP2120 Developer's Board should be powered. Use the pair of 18" (45 cm) power jumper cables to power MCP2120 Developer's Board #2 from MCP2120 Developer's Board #1. Optionally, MCP2120 Developer's Board #2 could be powered from a 9V battery. When the MCP2120 Developer's Board is powered, the green LED (labeled D3) will be on. Each MCP2120 Developer's Board should be connected to their respective PC serial port, so that Hyperterminal can communicate to the board. The MCP2120 Developer's Board should be oriented so that the integrated optical transceivers are aligned with each other (as shown in Figure 3.18). For the initial communication between the two boards, the MCP2120 Developer's Boards should be approximately 6" (15 cm) apart. Type a string of characters in the Hyperterminal window on PC #1. This same character sting should appear in the Hyperterminal window of PC #2. Typing a string of characters in the Hyperterminal window on PC #2 should have the same character string appear in the Hyperterminal window of PC #1. Congratulations! You may now start modifying the system to evaluate/test the operation of the MCP2120 and MCP2120 Developer's Board. Figure 3.18: MCP2120 Tutorial System
To IrDA Developer's Kit Power Supply (9V) MCP2120 Developer's Board #1
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=Fosc/768 001=Fosc/384 010=Fosc/192 011=Fosc/128 100=Fosc/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 D1 D5 U6 C8 C10 R4 JP4
+5V GND
R15
U4 R5 R11 D1 D5 C16 R12
MCP2120 Developer's Board #2
J2
U5
To PC #2
Component Transceiver J7 J6
DB9
TX
2001 Microchip Technology Inc.
C11
R15
Pair of 18" Power Jumper Cables
DS51246A-page 35
J5
R9
D3
D6 D2
C10
U2
R3
C6
U4
To PC #1
C18
CR1
C4
R4
J1
D4
C15
+5V
GND
JP4
R10
R5 R11
MCP2120 Developer's Board 02-01608 Rev. 1
J3
C7
(MCP2120) Open=Enabled
J4
RX
Component
J2
Header
U1
C13
C12
C14
JP5 R1
C3
C8
Q1
U3
R8
R7
R6
Transceiver J6 J7
R12
U6
IR
C1
C5
C9
R14
R2
C3
C2
JP3:JP1 000=Fosc/768 001=Fosc/384 010=Fosc/192 011=Fosc/128 100=Fosc/64 111=S/W Baud Open=0
R8
R7
R6
U1
J4
(MCP2120) Open=Enabled
J3 RTS MODE TX RX C17
R10
MCP2120 Developer's Board 02-01608 Rev. 1
U5
J1
Header
DB9
Integrated Transceiver
R13
Y1
MCP2120/MCP2150 USER'S GUIDE
3.6.1. System Debug Tips
If you are not getting communications between the two boards, some debugging is in order. Here are some suggested steps: * Verify that the Hyperterminal programs are set up correctly * Verify that both Hyperterminal sessions are "connected" * Verify that the MCP2120 Developer's Boards are powered * Verify that the MCP2120 Developer's Boards are set up correctly If that review does not locate the issue, then more in depth debugging is required. These steps require an oscilloscope. A digital 4-channel oscilloscope is recommended. By typing a data byte into Hyperterminal on the PC, the oscilloscope can be used to determine where in the system the data byte was "lost". Figure 3.19 and Figure 3.20 shows a debug flow to help troubleshoot the communications between the two MCP2120 Developer's Boards. Figure 3.19 shows the steps for the transmit side of System #1 (PC #1 and MCP2120 Developer's Board #1). If it appears that the TXIR signal is correct, then the receive side needs to be validated. Figure 3.20 shows the steps for the receive side of System #2 (PC #2 and MCP2120 Developer's Board #2). These steps can then be used to debug the transmit side of System #2 and the receive side of System #1.
DS51246A-page 36
2001 Microchip Technology Inc.
MCP2120 Tutorial
Figure 3.19: Debug Flowchart - MCP2120 Developer's Board #1 Side
Debug Board #1 Set up digital oscilloscope to capture waveform on first falling edge (Start bit) Type character in PC #1 Hyperterminal window
Data appear on MCP2120 TX pin? Yes Data appear on MCP2120 TXIR pin? Yes Goto Debug Board #2
No
Data appear on MAX232 R1IN pin?
No
No
Yes Data appear on MAX232 R1OUT pin? Yes
Verify that the connection from PC #1 to Board #1 is good. Try communication with another serial device (such as PICSTART Plus). No
Problem with MCP2120 Verify device has power/ground Ensure jumper JP4 is open Ensure crystal oscillator is correct frequency and operating Ensure Baud Rate is correct (jumpers JP1, JP2, and JP3) Try replacing with new MCP2120
Verify 3 pin header J4 is jumpered correctly
It appears that the MAX232 device is damaged
2001 Microchip Technology Inc.
DS51246A-page 37
MCP2120/MCP2150 USER'S GUIDE
Figure 3.20: Debug Flowchart - MCP2120 Developer's Board #2 Side
Debug Board #2 Verify that the connection for Board #1 TXIR to Optical Transceiver and Board #2 Optical Transceiver to RXIR (3 pin headers J6 and J7). Ensure that the Optical Transceivers are aligned. Ensure that distance between Board #1 and Board #2 is approximately 6" (15 cm). Try component transceiver option on each board (Board #1, then Board #2, and lastly both boards)
Data appear on MCP2120 RXIR pin? Yes
No
Data appear on MCP2120 RX pin? Yes
No
Problem with MCP2120 Verify device has power/ground Ensure jumper JP4 is open Ensure crystal oscillator is correct frequency and operating Ensure Baud Rate is correct (jumpers JP1, JP2, and JP3) Try replacing with new MCP2120
Data appear on MAX232 T1IN pin? Yes Data appear on MAX232 T1OUT pin?
No
Verify 3 pin header J4 is jumpered correctly No
Yes Verify that the connection from PC #1 to Board #1 is good. Try communication with another serial device (such as PICSTART Plus). Disconnect serial cable to ensure T1OUT is not loaded down. If still no data, it appears that the MAX232 device is damaged
DS51246A-page 38
2001 Microchip Technology Inc.
12
4.1 Introduction 4.2 Highlights
Topics covered in this chapter * MCP2150 Tutorial
MCP2120/MCP2150 USER'S GUIDE
Chapter 4. MCP2150 Tutorial
This chapter covers a tutorial for using the MCP2150 Developer's Board.
4.3 MCP2150 Tutorial
This tutorial was not available for this revision of the MCP2120/MCP2150 Developer's Kit User's Guide. Please check in the Development Tools section of the Microchip web site (www.microchip.com) for revision B of the User's Guide. Revision B is planned to include the tutorial on using the MCP2150 Developer's Board with an MCP2120 Developer's Board. Information on Microchip Development Tools can be located on the web site by using the Navagate window and selecting Developer's Tool Box > Development Tools.
2001 Microchip Technology Inc.
DS51246A-page 39
MCP2120/MCP2150 USER'S GUIDE
NOTES:
DS51246A-page 40
2001 Microchip Technology Inc.
12
5.1 Using the PICDEM 1 Board
MCP2120/MCP2150 USER'S GUIDE
Chapter 5. Using a PICDEMTM 1 or PICDEMTM 2 Board as Host
The PICDEMTM 1 board may be used as the host controller in an IrDA standard compatible system. PortB can be used to display received characters, while any of the other ports would be used for the UART and control signals. A PICmicro(R) microcontroller may be selected that has a hardware UART, or the UART functionality may be implemented in software. Figure 5.1 shows the parts layout (silk-screen) for the PICDEM 1 board. Figure 5.1: PICDEM 1 Parts Layout
Y2 7 RN1 R8 6 5 PORT B PICDEM-I DEMO BOARD (c)1993
4
3 RN2
2
1
0 GND
GND
J1
PIC17C42 C3 Y1 C4 R4 J3 R4 PULLUP C13 C12 C11 C10 PIC16C54/56/58 PIC16C71/84
U1 C1
+5V
R6 C8 U2
R1 PIC16C55/57 U3 C9
CR1
U5 U4
C7
C14
+9V IN
C6
C15
GND
+5V
+5V
J2
C16
Note 1: U1 is for use with any 40-pin PIC17C4X device. 2: U2 is for use with any 18-pin PIC16C5X, PIC16CXXX device. 3: U3 is for use with any 28-pin PIC16C5X, PIC16CXXX device.
2001 Microchip Technology Inc.
1
(R)
+
GND +5V R3 R7 S3 S2 S1 R5 CH0 POT R2 RA1 C2 MCLR C5 RTCC DIRECT +5V PWR SUPPLY CONNECTION
DS51246A-page 41
MCP2120/MCP2150 USER'S GUIDE
5.1.1. Application Notes
There are two Application Notes that show how to use the PICDEM 1 Board as a Host controller. AN756, "Using the MCP2120 for Infrared Communication", DS00756, uses the MCP2120 Developer's Board and has two code examples. The first is using a PIC16F84 with the MCP2120 Developer's Board in Hardware Baud mode. In this mode, only two signals need to be interfaced. The RX and TX signal. The second code example is also using a PIC16F84 with the MCP2120 Developer's Board in Software Baud mode. In this mode, four signals need to be interfaced; RX, TX, MODE, and RTS (used to reset the MCP2120). AN758, "Using the MCP2150 to Add IrDA Standard Wireless Connectivity", DS00758, uses the MCP2150 Developer's Board and has one code example. For this application, seven signals need to be interfaced; RX, TX, DSR, DTR, CTS, RTS, and CD.
5.1.2.
For Additional PICDEM 1 Information
Additional information can located on the Microchip web site (www.microchip.com). Information on Microchip Development Tools can be located by using the Navigate window and selecting Developer's Tool Box > Development Tools. The PICDEM 1 User's Guide literature number is DS33015, and the PICDEM 1 kit can be ordered with Part Number DM163001.
DS51246A-page 42
2001 Microchip Technology Inc.
Using a PICDEMTM 1 or PICDEMTM 2 Board as Host 5.2 Using the PICDEM 2 Board
The PICDEMTM 2 board may be used as the host controller in an IrDA standard compatible system. PortB can be used to display received characters, while any of the other ports would be used for the UART and control signals. A PICmicro microcontroller may be selected that has a hardware UART, or the UART functionality may be implemented in software. Figure 5.2 shows the parts layout (silk-screen) for the PICDEM 2 board. Figure 5.2: PICDEM 2 Parts Layout
U8 J2 +9V IN 9V BATTERY CR1 + C17 R15 PWR J6 7 RN2 6 U2 Y2 R4 C2 5 PORT B 4 3 U1 MCLR RA0 RA1 RA2 RA3 RA4 RA5 RE0 RE1 RE2 NC RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0 +5V +5V 2 1 0 RN1 2 1 LCD DSPLY J3 14 13 R6 R5
J1
C16
U5
CR2
GND
C19
R14 C11
C18 U3 J7 Y1 C5 C4
1
C3
C13 C12 C15 C14 R8 R9 R10 R11 R12 R13
TM
U4
PIC16C73
C8
Y3 C10
(RX) (TX) PIC16C64/74 RC2 (SDA) (SCL) (OSI) (OSO) RN4 RN3 J4 1
GND
+5V
C7
C6 R18
R17
R2 RESET
+5V
GND
RA4
S1
C1 R1 R3
RA0
S2
C9 R7 R19
J5
S3
KEYPAD
PICDEM 2 DEMO BOARD
(c)1994
Note 1: U2 is for use with any 28-pin PIC16CXXX or PIC18CXXX device. 2: U1 is for use with any 40-pin PIC16CXXX or PIC18CXXX device.
2001 Microchip Technology Inc.
GND
DS51246A-page 43
MCP2120/MCP2150 USER'S GUIDE
5.2.1. Application Notes
Currently there are no Application Notes that use the PICDEM 2 Board as a Host controller. The examples shown for the PICDEM 1 board can be easily modified to have the PICDEM 2 board operate as the Host controller.
5.2.2.
For Additional PICDEM 2 Information
Additional information can located on the Microchip web site (www.microchip.com). Information on Microchip Development Tools can be located by using the Navagate window and selecting Developer's Tool Box > Development Tools. The PICDEM 2 User's Guide literature number is DS30374, and the PICDEM 2 kit can be ordered with Part Number DM163002.
DS51246A-page 44
2001 Microchip Technology Inc.
12
A.1 Power Supply
MCP2120/MCP2150 USER'S GUIDE
Appendix A. Hardware Detail
The MCP2120/MCP2150 Developer's Board hardware is intended to illustrate the ease of use of Microchip's infrared data communication solutions. The Developer's Board features the following hardware elements:
There are three ways to supply power to the MCP2120/MCP2150 Developer's Board: * A 9V battery can be plugged into BT1. * A 9V, 750 mA unregulated AC or DC supply can be plugged into J5. * A +5V, 750 mA regulated DC supply can be connected to the two pins provided, labled +5V and GND. A pair of 18" (45 cm) cables are provided to allow one board to power another.
A.2 Power Indicator
One green LED indicates whether there is power applied to the MCP2120 and MCP2150 Developer Boards (LED lit) or not (LED off).
A.3 RS-232 Serial Port
A.3.1 MCP2120 Developer's Board
A MAX232 compatible level shifting IC has been provided with all necessary hardware to support connection of an RS-232 host through the DB-9 connector. The port can be connected to a PC using a straight through cable. Refer to the MCP2120 Data Sheet for more information.
A.3.2
MCP2150 Developer's Board
A MAX3238E compatible level shifting IC has been provided with all necessary hardware to support connection of a RS-232 host through the DB-9 connector. The port can be connected to a PC using a straight through cable. Refer to the MCP2120 Data Sheet (DS21618) for more information.
2001 Microchip Technology Inc.
DS51246A-page 45
MCP2120/MCP2150 USER'S GUIDE A.4 Jumpers
Jumpers are used to allow the Developer's Board to be configured into the different modes that are possible. These modes include: * Selection of Baud Rate * Source of Host signals * Source of Optical Transceiver signals * Device Enable signal for power down operation
A.4.1
MCP2120 Developer's Board
The MCP2120 Developer's Board has the following jumpers: 1. Two jumpers to select source of UART signals. Either RS-232C socket or the four-pin header. 2. Three jumpers to select desired baud rate. 3. Two jumpers to select IR Transceiver options. 4. Jumper to disable device operation. 5. Jumper for Software Baud control when using RS-232C interface. Figure A.1: MCP2120 Developer's Board Hardware
4
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
R5 R11 R10 Component D1 Transceiver D5 J7 J6 R12
3
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
5
1
2
DS51246A-page 46
2001 Microchip Technology Inc.
Hardware Detail
A.4.2 MCP2150 Developer's Board
The MCP2150 Developer's Board has the following jumpers: 1. Three jumpers to select source of UART signals. Either RS-232C socket or the eight-pin header. 2. Two jumpers to select desired baud rate. 3. Two jumpers to select IR Transceiver options. 4. Jumper to disable device operation. Figure A.2: MCP2150 Developer's Board Hardware
4
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3 C5 R8 R7 R9 C11 U4 R5 R6 C13 C6 D2 D5 C9 U3 D1 R14 R10 D6 U6 JP2 JP1 00 01 10 11 Integrated BAUD Transceiver 9600 19200 R11 R13 C16 57600 115200
Power D3
R1
J6
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
3
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
DB9
+5VGND
1
2
2001 Microchip Technology Inc.
DS51246A-page 47
MCP2120/MCP2150 USER'S GUIDE A.5 Oscillator Options
The MCP2120 can be operated at different frequencies, while the MCP2150 only operates at a single fixed frequency.
A.5.1
MCP2120 Developer's Board
The MCP2120 Developer's Board crystal has pin receptacles so that crystal frequencies can easily be changed. Table A.1 shows the baud rates for a given crystal frequency, based on the state of the BAUD2:BAUD0 pins. Table A.1: Crystal Frequency / Baud Rate
FOSC Frequency (MHz) BAUD2:BAUD0 Bit Rate 0.6144 (1) 2.000 3.6864 4.9152 7.3728 800 2604 4800 6400 9600 000 FOSC / 768 001 FOSC / 384 1600 5208 9600 12800 19200 010 FOSC / 192 3200 10417 19200 25600 38400 4800 15625 28800 38400 57600 011 FOSC / 128 100 FOSC / 64 9600 31250 57600 78600 115200 Note 1: An external clock is recommended for frequencies below 2 MHz. Note 2:
14.7456 (2) 20.000 (2) 19200 26042 38400 52083 78600 104167 115200 156250 230400 312500
For frequencies above 7.5 MHz, the TXIR pulse width (MCP2120 Data Sheet electrical specification parameter IR121) will be shorter than the minimum pulse width of 1.6 s in the IrDA standard specification.
A.5.2
MCP2150 Developer's Board
The MCP2150 Developer's Board requires a fixed frequency crystal (11.0592 MHz). Table A.2: Crystal Frequency / Baud Rate
BAUD1:BAUD0 00 01 10 11 Bit Rate FOSC / 1152 FOSC / 576 FOSC / 192 FOSC / 96 FOSC Frequency 11.0592 MHz 9600 19200 57600 115200
DS51246A-page 48
2001 Microchip Technology Inc.
Hardware Detail A.6 Board Layout
Figure A.3 shows the component layout (silkscreen) for the MCP2120 Board. Figure A.3: MCP2120 Developer's Board Component Layout
R9 D3 D6 D2 C17 C11 U2 C18 C6 R3 Y1 J5 CR1 D4 C15 C4 C7 C12 C13 C14 JP5 R1 Q1 U3 C9 C5 C1 R14 R2 C2 JP3:JP1 000=FOSC/768 001=FOSC/384 010=FOSC/192 011=FOSC/128 100=FOSC/64 111=S/W Baud Open=0 MODE RTS Integrated Transceiver R13 C16 U6 C8 C10 R4 JP4 R10 R5 R11 D1 D5 R12 U4 R15
U5
(MCP2120) Open=Enabled R8 R7 R6
Component Transceiver J7 J6
C3
DB9
RX
J2
MCP2120 Developer's Board 02-01608 Rev. 1
TX
J4 J1
Header
U1
J3
+5V
GND
Figure A.4 shows the component layout (silkscreen) for the MCP2150 Board. Figure A.4: MCP2150 Developer's Board Component Layout
BT1 C8 U5 C17 D4 C14 CR1 C15 C16 C12 Y1 U2 C7 R2 JP3 Power D3 R7 C5 R8 R9 C11 U4 R5 R6 C13 C6 U6 JP2 JP1 00 01 10 11 BAUD 9600 19200 R11 R13 C16 57600 115200 Integrated Transceiver D2D5 C9 U3 D1 R14 R10 D6 R1
J6
(MCP2150) Open=Enabled Component Transceiver J7 J8 R4 R3 JP2 JP1
C1 C3 C10
C4 C2 CD U1 D7
J5 MCP2150 Dev Board 02-01609 Rev. 1
J4 J3 J2
Header TX RX CTS RTS DTR DSR CD RI GND +5 J1
DB9
+5VGND
2001 Microchip Technology Inc.
DS51246A-page 49
MCP2120/MCP2150 USER'S GUIDE A.7 Schematics
Figure A.5 shows the schematic for the MCP2120 Developer's Board. Figure A.6 shows the schematic for the MCP2150 Developer's Board.
DS51246A-page 50
2001 Microchip Technology Inc.
Hardware Detail
Figure A.5: MCP2120 Developer's Board Schematic
VDD 2 VCC 16
T1OUT 14 T2OUT 7
R1IN 13 R2IN 8 12 R1OUT 9 R2OUT
2001 Microchip Technology Inc.
15 GND
11 T1IN 10 T2IN
1 C1+ 3 C14 C2+ 5 C2-
VEE 6
DS51246A-page 51
DS51246A-page 52
28 C1+ 25 C11 C2+ 3 C224 23 22 19 17 T1IN T2IN T3IN T4IN T5IN 15 8 9 11 T1OUT T2OUT T3OUT T4OUT T5OUT 14 FORCE_OFF 13 FORCEON INVALID 16 R1OUTB 21 R1OUT R1IN 20 R2OUT R2IN 18 R3OUT R3IN 2 GND VEE 4 5 6 7 10 12 VDD 27 VCC 26
MCP2120/MCP2150 USER'S GUIDE
Figure A.6: MCP2150 Developer's Board Schematic
2001 Microchip Technology Inc.
12
DESCRIPTION OF REVISION
This section covers the major changes to this document between the revisions. These changes include the corrections and enhancements that have been implemented. Current Revision (Revision A) Initial release of this document
MCP2120/MCP2150 USER'S GUIDE
Revision History
2001 Microchip Technology Inc.
DS51246A-page 53
MCP2120/MCP2150 USER'S GUIDE
NOTES:
DS51246A-page 54
2001 Microchip Technology Inc.
12
B Board Layout: MCP2120 Developer's Board Component Layout ......................................... 49 MCP2150 Developer's Board Component Layout ......................................... 49 D Disabling the MCP2120 .................................. 11 Disabling the MCP2150 .................................. 16 H Hardware Setup: Board Jumpers ......................................... 22 Oscillator .................................................. 22 J Jumpers: MCP2120 Developer's Board .................. 46 MCP2150 Developer's Board .................. 47 M MCP2120 Developer's Board: Component Transceiver ............................. 8 Disable device operation ............................ 6 Hardware Baud selection ........................... 6 Integrated Transceiver ............................... 8 Ir Transceiver ............................................. 6 Selecting Baud Rate .................................. 9 Software Baud selection ............................ 6 UART Interface .......................................... 6 MCP2150 Developer's Board: Component Transceiver ........................... 14 Hardware Baud selection ......................... 12 Ir Transceiver ..................................... 12, 14 Selecting Baud Rate ................................ 15 UART Interface ........................................ 12 O Oscillator Options: MCP2120 Developer's Board .................. 48 MCP2150 Developer's Board .................. 48 P PC Requirements ........................................... 20 PICDEM 1 Board ............................................ 41 PICDEM 2 Board ............................................ 43
MCP2120/MCP2150 USER'S GUIDE
Index
Power Supply .................................................. 45 R Reference Documents ...................................... 3 S Sample Devices ................................................ 3 Schematics ..................................................... 50 Serial Port ....................................................... 45 System Configurations .................................... 17 T Terminal Program ........................................... 25 Tutorial Setup ........................................... 21, 39 U UART Mode .................................................... 10
2001 Microchip Technology Inc.
DS51246A-page 55
MCP2120/MCP2150 USER'S GUIDE
NOTES:
DS51246A-page 56
2001 Microchip Technology Inc.
NOTES:
2001 Microchip Technology Inc.
DS51246A-page 57
MCP2120/MCP2150 USER'S GUIDE
NOTES:
DS51246A-page 58
2001 Microchip Technology Inc.
MCP2120/MCP2150 USER'S GUIDE
Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchip's products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, KEELOQ, SEEVAL, MPLAB and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. Total Endurance, ICSP, In-Circuit Serial Programming, FilterLab, MXDEV, microID, FlexROM, fuzzyLAB, MPASM, MPLINK, MPLIB, PICC, PICDEM, PICDEM.net, ICEPIC, Migratable Memory, FanSense, ECONOMONITOR, Select Mode and microPort are trademarks of Microchip Technology Incorporated in the U.S.A. Serialized Quick Term Programming (SQTP) is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. (c) 2001, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received QS-9000 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona in July 1999. The Company's quality system processes and procedures are QS-9000 compliant for its PICmicro(R) 8-bit MCUs, KEELOQ(R) code hopping devices, Serial EEPROMs and microperipheral products. In addition, Microchip's quality system for the design and manufacture of development systems is ISO 9001 certified.
2001 Microchip Technology Inc.
DS51246A-page 59
M
WORLDWIDE SALES AND SERVICE
AMERICAS
Corporate Office
2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Web Address: http://www.microchip.com
ASIA/PACIFIC
Australia
Microchip Technology Australia Pty Ltd Suite 22, 41 Rawson Street Epping 2121, NSW Australia Tel: 61-2-9868-6733 Fax: 61-2-9868-6755
Japan
Microchip Technology Japan K.K. Benex S-1 6F 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel: 81-45-471- 6166 Fax: 81-45-471-6122
Rocky Mountain
2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7966 Fax: 480-792-7456
China - Beijing
Microchip Technology Consulting (Shanghai) Co., Ltd., Beijing Liaison Office Unit 915 New China Hong Kong Manhattan Bldg. No. 6 Chaoyangmen Beidajie Beijing, 100027, No. China Tel: 86-10-85282100 Fax: 86-10-85282104
Korea
Microchip Technology Korea 168-1, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5934
Atlanta
500 Sugar Mill Road, Suite 200B Atlanta, GA 30350 Tel: 770-640-0034 Fax: 770-640-0307
Singapore
Microchip Technology Singapore Pte Ltd. 200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-334-8870 Fax: 65-334-8850
Austin - Analog
8303 MoPac Expressway North Suite A-201 Austin, TX 78759 Tel: 512-345-2030 Fax: 512-345-6085
China - Chengdu
Microchip Technology Consulting (Shanghai) Co., Ltd., Chengdu Liaison Office Rm. 2401, Ming Xing Financial Tower No. 88 TIDU Street Chengdu 610016, China Tel: 86-28-6766200 Fax: 86-28-6766599
Taiwan
Microchip Technology Taiwan 11F-3, No. 207 Tung Hua North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
Boston
2 Lan Drive, Suite 120 Westford, MA 01886 Tel: 978-692-3848 Fax: 978-692-3821
China - Fuzhou
Microchip Technology Consulting (Shanghai) Co., Ltd., Fuzhou Liaison Office Rm. 531, North Building Fujian Foreign Trade Center Hotel 73 Wusi Road Fuzhou 350001, China Tel: 86-591-7557563 Fax: 86-591-7557572
Boston - Analog
Unit A-8-1 Millbrook Tarry Condominium 97 Lowell Road Concord, MA 01742 Tel: 978-371-6400 Fax: 978-371-0050
EUROPE
Denmark
Microchip Technology Denmark ApS Regus Business Centre Lautrup hoj 1-3 Ballerup DK-2750 Denmark Tel: 45 4420 9895 Fax: 45 4420 9910
Chicago
333 Pierce Road, Suite 180 Itasca, IL 60143 Tel: 630-285-0071 Fax: 630-285-0075
China - Shanghai
Microchip Technology Consulting (Shanghai) Co., Ltd. Room 701, Bldg. B Far East International Plaza No. 317 Xian Xia Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060
Dallas
4570 Westgrove Drive, Suite 160 Addison, TX 75001 Tel: 972-818-7423 Fax: 972-818-2924
France
Arizona Microchip Technology SARL Parc d'Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Dayton
Two Prestige Place, Suite 130 Miamisburg, OH 45342 Tel: 937-291-1654 Fax: 937-291-9175
China - Shenzhen
Microchip Technology Consulting (Shanghai) Co., Ltd., Shenzhen Liaison Office Rm. 1315, 13/F, Shenzhen Kerry Centre, Renminnan Lu Shenzhen 518001, China Tel: 86-755-2350361 Fax: 86-755-2366086 Hong Kong Microchip Technology Hongkong Ltd. Unit 901, Tower 2, Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431
Germany
Arizona Microchip Technology GmbH Gustav-Heinemann Ring 125 D-81739 Munich, Germany Tel: 49-89-627-144 0 Fax: 49-89-627-144-44
Detroit
Tri-Atria Office Building 32255 Northwestern Highway, Suite 190 Farmington Hills, MI 48334 Tel: 248-538-2250 Fax: 248-538-2260
Germany - Analog
Lochhamer Strasse 13 D-82152 Martinsried, Germany Tel: 49-89-895650-0 Fax: 49-89-895650-22
Los Angeles
18201 Von Karman, Suite 1090 Irvine, CA 92612 Tel: 949-263-1888 Fax: 949-263-1338
Italy
Arizona Microchip Technology SRL Centro Direzionale Colleoni Palazzo Taurus 1 V. Le Colleoni 1 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883
New York
150 Motor Parkway, Suite 202 Hauppauge, NY 11788 Tel: 631-273-5305 Fax: 631-273-5335
India
Microchip Technology Inc. India Liaison Office Divyasree Chambers 1 Floor, Wing A (A3/A4) No. 11, O'Shaugnessey Road Bangalore, 560 025, India Tel: 91-80-2290061 Fax: 91-80-2290062
San Jose
Microchip Technology Inc. 2107 North First Street, Suite 590 San Jose, CA 95131 Tel: 408-436-7950 Fax: 408-436-7955
United Kingdom
Arizona Microchip Technology Ltd. 505 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 5TU Tel: 44 118 921 5869 Fax: 44-118 921-5820
06/01/01
Toronto
6285 Northam Drive, Suite 108 Mississauga, Ontario L4V 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509
DS51246A-page 60
2001 Microchip Technology Inc.


▲Up To Search▲   

 
Price & Availability of MCP2150

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X